#include "yuvfilespec.h"


YUVFileSpec::YUVFileSpec(int width, int height, AVPixelFormat format, int fps, char *filePath):YUVSpec(width,height,fps,format)
{

    int filePathLen = strlen(filePath);
    this->filePath = new char[filePathLen + 1]{};
    memcpy(this->filePath,filePath,filePathLen);
}

YUVFileSpec::YUVFileSpec(const YUVFileSpec &yuvFileSpec)
    :YUVFileSpec(yuvFileSpec.getWidth(),yuvFileSpec.getHeight(),yuvFileSpec.getFormat(),yuvFileSpec.getFps(),yuvFileSpec.filePath)
{

}

YUVFileSpec::~YUVFileSpec()
{

    if(this->filePath) {

        delete []filePath;
        filePath = nullptr;
    }
}


char *YUVFileSpec::getFilePath()
{

    return filePath;
}
